package com.mdd.admin.validate.system;

import com.mdd.admin.validate.BaseParam;
import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import lombok.Data;
import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 领取记录参数
 * @author panweiliang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CouponReceiveParam extends BaseParam {

    @IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Integer id;

    @NotNull(message = "userId参数缺失", groups = {create.class, update.class})
    private Integer userId;

    private String issuer;

    @NotNull(message = "couponId参数缺失", groups = {create.class, update.class})
    private Integer couponId;

    @NotNull(message = "fullAmount参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "fullAmount参数值不能少于0", groups = {create.class, update.class})
    private BigDecimal fullAmount;

    @NotNull(message = "amount参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "amount参数值不能少于0", groups = {create.class, update.class})
    private BigDecimal amount;

    @NotNull(message = "status参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "status参数值不能少于0", groups = {create.class, update.class})
    private Integer status;

    @NotNull(message = "receiveTime参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "receiveTime参数值不能少于0", groups = {create.class, update.class})
    private Long receiveTime;

    @NotNull(message = "usedTime参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "usedTime参数值不能少于0", groups = {create.class, update.class})
    private Long usedTime;

    @NotNull(message = "expireTime参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "expireTime参数值不能少于0", groups = {create.class, update.class})
    private Long expireTime;

}
